#ifndef INPUTDEVICE_H_
#define INPUTDEVICE_H_

// By: Jesse Guarascia de Urena
// Base Input Device Class
// Anything that wants to use input should inherit this

#include <SDL.h>
#include <vector>

class InputDevice
{
private:
	// Array of the input devices
	static std::vector<InputDevice *> devices;

protected:
	// Key array all input devices share
	static Uint8* key;

	// SDL_Event all input devices share
	static SDL_Event event;
	
	// Check what key is down
	bool isKeyDown(SDLKey _key);

	InputDevice(InputDevice *d);
public:
	InputDevice(void);
	~InputDevice(void);

	// Update the input device
	static void Update();

	// Free the key array
	static void Free();

	// All event functions
	virtual void OnKeyPress() {};
};

#endif // INPUTDEVICE_H_